﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Notification.ascx.cs" Inherits="UserControls_Notification" %>

<div class="menu">
    <div class="menuheader">
        <h3>
            Thông báo
        </h3>
    </div>
    <asp:Timer ID="NotificationTimer" runat="server" Interval="5000" OnTick="NotificationTimer_TimeTick">
    </asp:Timer>
    <asp:ObjectDataSource ID="sourceTopFiveNotifications" runat="server" 
        SelectMethod="GetTopFive" TypeName="KetBanBonPhuong.Notification">
    </asp:ObjectDataSource>
    <asp:UpdatePanel ID="NotificationPanel" runat="server" UpdateMode="Conditional">
        <Triggers>
            <asp:AsyncPostBackTrigger EventName="Tick" ControlID="NotificationTimer" />
        </Triggers>
        <ContentTemplate>
            <div class="menucontent">
                <asp:Repeater ID="rptTopFiveNotification" runat="server" DataSourceID="sourceTopFiveNotifications">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem, "message") %>
                        <br />
                    </ItemTemplate>
                </asp:Repeater>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</div>
    <div class="menufooter">
</div>